﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ClassLibrary.App_Code;

/// <summary>
/// Summary description for AdminDAL
/// </summary>
public class AdminDAL
{
	public AdminDAL()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public static ShopMobileDataContext data = new ShopMobileDataContext();
    internal static bool chkLoginAdmin(AdminBLL ad)
    {
        var check = from us in data.Admins
                    where us.username.ToLower() == ad.username.ToLower() && us.password == ad.password
                    select us;
        if (check.Any())
            return true;
        else
            return false;
    }
}